<html>
<head>
<title>budo graph (FM)</title>
</head>
    <body>
        <div>
            <h1>budo-graph-index (FM)</h1>
            <a target="_blank"  href="${request.contextPath!}/budo-graph/force-graph">force-graph</a>
            <br/>
            <br/>
        </div>

        <div>
            <a>Sort</a>
            <a href="?sort=host">host</a>
            <a href="?sort=port">port</a>
            <a href="?sort=applicationName">applicationName</a>
            <a href="?sort=processName">processName</a>
            <a href="?sort=startTime">startTime</a>
            <a href="?sort=druidActiveCount">druidActiveCount</a>
            <a href="?sort=druidMaxActive">druidMaxActive</a>
            <a href="?sort=druidActiveCount">redisNumActive</a>
            <a href="?sort=druidMaxActive">redisMaxTotal</a>
            <a href="?sort=sourceCodeVersion">sourceVersion</a>
        </div>
        <ol>
            <#assign _sort>${(RequestParameters["sort"])!}</#assign>
            <#if !(_sort??) || (_sort?length lt 1)> 
                <#assign _sort>port</#assign> 
            </#if>
            <#list dubboProviders?sort_by(_sort)?reverse as dubboProvider>
            <li>
                <a target="_blank" href="${request.contextPath!}/budo-graph/${dubboProvider.host}/${dubboProvider.port?c}/index.html" title="${dubboProvider.toFullString()}">${dubboProvider.toSimpleString()}</a>
                <br />
                <#list ["system-info", "system-property", "thread-info", "memory-map", "perf-count", "top-process", "top-thread", "log-level", "dubbo-echo", "dubbo-service", 
                            "class-path", "git-log", 
                            "spring-bean", "mybatis-mapper", "database-metadata", "active-connections", "placeholder", "available-fonts", "ehcache-statistics", "line-graph", "graph-data", "redis-pool", "spring-task"] as each>
                    <a target="_blank" href="${request.contextPath!}/budo-graph/${dubboProvider.host}/${dubboProvider.port?c}/${each}">${each}</a>
                    <#if (each_index+1)%11==0> <br /></#if>
                </#list>

                <a title="读写分离配置调整" target="_blank" href="${request.contextPath!}/budo-graph/#/sharding?host=${dubboProvider.host}&port=${dubboProvider.port?c}" >sharding</a>
                <br /> <br/>
            </li>
            </#list>
        </ol>

        <div>
            <h3>Request Headers</h3>
        </div>
        <ol>
            <#assign headerMap = def["org.budo.support.mvcs.Mvcs"].getRequestHeaderMap(request) />
            <#assign keys = headerMap.keySet().toArray() />
            <#list keys?sort as key>
                <li>
                    <b>${key}:</b> ${def["org.budo.support.lang.util.StringUtil"].join(headerMap[key])}
                </li>
            </#list>
        </ol>
        <div>
            <h3>Request Info</h3>
        </div>
        <ol>
           <li>
                <b>Scheme:</b> ${request.getScheme()}
           </li>
           <li>
                <b>Protocol:</b> ${request.getProtocol()}
           </li>
           <li>
                <b>ServerName:</b> ${request.getServerName()}
           </li>
           <li>
                <b>ServerPort:</b> ${request.getServerPort()}
           </li>
           <li>
                <b>LocalName:</b> ${request.getLocalName()}
            </li>
            <li>
                <b>RemoteAddr:</b> ${request.getRemoteAddr()}
           </li>
            <li>
                <b>Request:</b> ${request}
           </li>
        </ol>
    </body>
</html>